// import { type IPageList, type BaseResponse } from '@/webapis/base';
import { UUID } from "@/utils/util";
import { type BaseResponse } from '@/webApis/base';
import { type Address } from '@/webApis/v1/models';

export namespace address {
	export const getPageListAsync = async (data : { pageNum : number, pageSize : number }) : Promise<BaseResponse> => {
		return new Promise((resolve) => {
			setTimeout(() => {
				let response : BaseResponse = {
					rows: [],
					total: 35,
				}
				for (let i = 0; i < 5; i++) {
					const address : Address = {
						id: UUID(),
						name: 'name-' + i,
						address: "address-" + i,
						city: "郑州",
						state: "河南",
						zipCode: "450000",
					};
					response.rows.push(address);
				}
				resolve(response);
			}, 100);
		})
	}

}